<!--奖品列表-->
<template>
  <el-card shadow="never">
    <div class="flex-between m-bottom20">
      <div class="fit-title">套餐列表</div>
    </div>
    <el-table
      max-height="273px"
      :data="tableData"
      ref="table"
      tooltip-effect="dark"
      border
      stripe>
      <el-table-column  label="套餐名称" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.mealName"></el-input>
        </template>
      </el-table-column>
      <el-table-column label="套餐零售价">
        <template slot-scope="scope">
          <el-input v-model="scope.row.retailPrice"></el-input>
        </template>
      </el-table-column>
      <el-table-column label="代理拿货价">
        <template slot-scope="scope">
          <el-input v-model="scope.row.deliveryPrice"></el-input>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script>
import { mealPageList } from '@/api/oem';
  export default {
    name: "prize",
    data() {
      return {
        // 上传背景图片url
        fileList:[],
        // 背景图
        imageUrl: '',
        list:[],
        tableData: []
      }
    },
    created() {
      /* 获取角色数据 */
      mealPageList({})
        .then((list) => {
          this.tableData = list;
          // this.$emit('uploadPrice',this.tableData)
        })
        .catch((e) => {
          this.$message.error(e.message);
        });
    },
    methods:{
      uploadByWxhgz(file, fileList) {
        if (fileList.length > 1) {
          fileList.splice(0, 1);
        }
        console.log("fileList",fileList)
        // 执行其他操作
      },
    //  确认提交
      confirm(){
        console.log('确认提交',this.tableData)
      }
    }
  }
</script>

<style scoped lang="less">
  .fit-title{
    color: #333333;
    font-size: 16px;
    margin:0px 2px;
  }
  .tj-class{
    margin: 30px 10px 0;
  }
  .avatar-uploader{
    margin: 0;
    padding: 0;
    outline: none;

    /* 修改 start*/
    border: 1px solid #D9D9D9;
    border-radius: 2px;
    /*end*/
    width: 88px;
    height: 88px;
  }
  /*  ‘背景图’上传 start */
  .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
  .avatar-uploader-icon {
    color: #D9D9D9;
    text-align: center;
    i{
      font-size: 28px;
    }
    div{
      padding-top: 3px;
    }
  }
  .avatar {
    width: 90px;
    height: 90px;
    display: block;
  }
/*  end*/
</style>
